<?php
    Zend_Loader::loadClass("Zend_Json_Encoder");
    $recs = array();
    $i = 0;
    foreach($this->locations as $rec)
    {
        $recs[$i]['id'] = $rec->id;
        $recs[$i]['name'] = $rec->name;
        $i = $i + 1;
    }
    echo '{rows:'.Zend_Json_Encoder::encode($recs).'}';
?>